#version 300 es

precision highp float;

layout(location = 0) in vec4 waveValue; // this {x,y} and next {x,y}

flat out vec4 pointValue;
out float pointX;

uniform vec2 xRange;

float x_standard(float x)
{
    return (x - xRange.x) / (xRange.y - xRange.x) * 2.0 - 1.0;
}

void main() {
    pointValue = waveValue;
    pointX = waveValue.x;
    gl_Position = vec4(x_standard(pointX), 0, 0, 1);
}
